﻿using Microsoft.Extensions.Logging;

namespace Grow.Log.Serilog
{
    public class Log<TCategoryName> : ILog<TCategoryName>
    {
        private readonly ILogger<TCategoryName> _logger;
        public Log(ILogger<TCategoryName> logger)
        {
            _logger = logger;
        }

        public void LogCritical(string message, Exception? exception = null, int eventId = 0)
        {
            _logger.LogCritical(eventId, exception, message);
        }



        public void LogDebug(string message, Exception? exception = null, int eventId = 0)
        {
            _logger.LogDebug(eventId, exception, "{message}", message);
        }



        public void LogError(string message, Exception? exception = null, int eventId = 0)
        {
            _logger.LogError(eventId, exception, "{message}", message);
        }



        public void LogInformation(string message, Exception? exception = null, int eventId = 0)
        {
            _logger.LogInformation(eventId, exception, "{message}", message);
        }


        public void LogTrace(string message, Exception? exception = null, int eventId = 0)
        {
            _logger.LogTrace(eventId, exception, "{message}", message);
        }



        public void LogWarning(string message, Exception? exception = null, int eventId = 0)
        {
            _logger.LogWarning(exception, "{message}", message);
        }



    }
}
